1) Field of the Invention
The present invention relates to a technology for performing a rendering process and an image processing on three-dimensional graphic data.
2) Description of the Related Art
In recent years, color desktop publishing (DTP) processors and word processors include highly-functional applications, thereby making it possible to create not only text but also complex graphics. Among others, a gradation function for successively changing color density is widely used for enhancing the appearance of documents. For example, GDI+® is known as a graphic application programming interface (API) for WINDOWS® 2000, which is an operation system dedicated to personal computers and manufactured by Microsoft Corporation. A gradient fill of this GDI+® defines, as shown in FIG. 33, three end points of a triangle with each different color, and interpolates inside of each point for rendering.
Also, in Power Point®, which is a presentation software program manufactured by Microsoft Corporation, two-dimensional graphics and photo images are pasted for creating documents for presentation.
Conventionally, pasting three-dimensional graphic data on a presentation document or the like is performed after the three-dimensional graphic data is converted to two-dimensional image data.
As for three-dimensional (3D) processing, a scheme is known in which end points of a triangle polygon are assigned with RGB colors and then interpolation is performed based on a plane equation.
In Power Point® of Microsoft Corporation, examples of an image to be pasted are two-dimensional bit map data and two-dimensional graphics. As for two-dimensional bit map data, due to a difference in resolution between a cathode-ray tube (CRT) and a printer, the image is disadvantageously degraded when printed out with a zoom-in process.
On the other hand, two-dimensional graphics allow zoom-in and zoom-out, and therefore no image degradation occurs due to zoom-in. However, two-dimensional graphics are not as realistic as photo images. Also, a two-dimensional graphic is merely a figure viewed from one direction. To get a figure viewed from another direction, another figure has to be rendered.
The problems described above at the time of using two-dimensional graphics can be solved by pasting three-dimensional graphic data. Three-dimensional graphic data allows zoom-in and zoom-out, and no image degradation occurs due to zoom-in. Also, three-dimensional graphics are realistic as photo images. Furthermore, the three-dimensional graphics can be rotatably pasted, thereby making it possible to freely generate two-dimensional images with different view points.
However, when three-dimensional graphic data is pasted during a rendering process with a gradient fill of GDI+®, for example, such rendering is merely two-dimensional rendering. Therefore, in rendering three-dimensional graphic data, a hidden-surface process cannot be performed and therefore, disadvantageously, a clear and realistic image cannot be generated.
The hidden-surface process is described below. FIG. 34A is a diagram for explaining an example of the hidden-surface process. Here, two three-dimensional triangles are provided at their end points with Z values, and the hidden-surface process is performed through the known Z buffer scheme, for example. When the hidden-surface process is accurately performed, as shown in the drawing, in a three-dimensional point of view, one triangle is penetrated by the other triangle. FIG. 34B is a diagram for explaining an example of a rendering process without a hidden-surface process. In this case, a figure in which one triangle is not penetrated by the other triangle, which is different from a figure actually viewed, is rendered.
FIG. 34C is a diagram for explaining another example of the rendering process without a hidden-surface process. In this example, one three-dimensional triangle is divided into two figures to be displayed for rendering. FIG. 34D is a diagram for explaining still another example of the rendering process without a hidden-surface process so that a stereoscopic positional relation between the two triangles is made clear. In this example, three figures are rendered. With this, a process of obtaining a figure to be displayed becomes complex, and an image processing time is increased.
Moreover, at the time of forming an image, such as at the time of actual printing, a scheme can be taken in which a three-dimensional graphic process is performed typically by a host personal computer on three-dimensional graphic data in print data, and after the three-dimensional graphic data is converted to two-dimensional data, the data is transferred to a printer. In this case, however, communication data and a communication time are increased. Also, due to a difference between a resolution of a host personal computer and a low resolution of the printer, an aliasing becomes conspicuous when the data is actually printed out, resulting in low image quality.
To solve these conventional problems, a printing apparatus has been published in which a rendering process is performed in the printing apparatus so that print data including three-dimensional image information received from a host is changed to a three-dimensional graphic for print-out, thereby reducing a load on data communications and achieving a high-speed process (see, for example, Japanese Patent Laid-Open Publication No. 07-168679).
This printing apparatus uses a scheme in which projection conversion is performed by the printing apparatus itself for converting three-dimensional graphic data to two-dimensional data for rendering.
According to the patent document mentioned above, a decision regarding a back side is made to a convex figure, such as a simple hexahedron, and then projection conversion is performed, thereby making it possible to render approximately accurate figure. However, the patent document does not mention a hidden-surface process required for normal three-dimensional graphic data. In practice, without such a hidden-surface process, an accurate figure cannot be rendered.
Furthermore, conventionally, the Z buffer scheme is known as a hidden-surface process. Currently, however, printers are typically at a resolution of 120 dots per inch (dpi), which requires a memory amount that is several tens of times as large as a memory amount of a CRT at a resolution of 72 dpi. Therefore, it is generally not an easy task for the printer to perform a hidden-surface process.